import request from './request'
let api={}

// 登录
api.login=data=>request('/public/login','GET',data)

// 注册
api.register=data=>request('/public/register','POST',data)

// 获取个人信息
api.getUserInfo=data=>request('/campus-repair/getUserInfo','GET',data)

// 提交报修单
api.repairAdd=data=>request('/campus-repair/repairAdd','POST',data)

// 获取报修单列表
api.getRepairList=data=>request('/campus-repair/getRepairList','GET',data)

// 获取报修单详情
api.getRepairInfo=data=>request('/campus-repair/getRepairInfo','GET',data)

//催单
api.repairFast=data=>request('/campus-repair/repairFast','POST',data)

//取消报修
api.repairCancel=data=>request('/campus-repair/repairCancel','PUT',data)

// 获取指派技工列表
api.getNowPersonList=data=>request('/campus-repair/getNowPersonList','GET',data)


// 指派技工
api.personAssign=data=>request('/campus-repair/personAssign','POST',data)

// 开始维修
api.beginRepair=data=>request('/campus-repair/beginRepair','PUT',data)

// 打回改派
api.repersonAssign=data=>request('/campus-repair/repersonAssign','PUT',data)

// 维修结果上报
api.repairReport=data=>request('/campus-repair/repairReport','POST',data)

// 评价
api.repairIdea=data=>request('/campus-repair/repairIdea','POST',data)

// 验收操作
api.repairAcceptance=data=>request('/campus-repair/repairAcceptance','POST',data)

// 人员管理列表
api.getpersonList=()=>request('/campus-repair/getpersonList','GET')
// 人员增加
api.personAdd=data=>request('/campus-repair/personAdd','POST',data)
// 人员详情
api.getPersonInfo=data=>request('/campus-repair/getPersonInfo','GET',data)
// 人员修改
api.personEdit=(data)=>request('/campus-repair/personEdit','PUT',data)

// 工种列表
api.getTypeList=()=>request('/campus-repair/getTypeList','GET')




// 公告列表
api.getNoticeList=data=>request('/campus-repair/getNoticeList','GET',data)
// 公告增加
api.noticeAdd=data=>request('/campus-repair/noticeAdd','POST',data)
// 公告详情
api.getNoticeInfo=data=>request('/campus-repair/getNoticeInfo','GET',data)
// 公告修改
api.noticeEdit=data=>request('/campus-repair/noticeEdit','PUT',data)


// 配件列表
api.getPartsList=data=>request('/campus-repair/getPartsList','GET',data)
// 配件增加
api.partsAdd=data=>request('/campus-repair/partsAdd','POST',data)
// 配件详情
api.getPartsInfo=data=>request('/campus-repair/getPartsInfo','GET',data)
// 配件修改
api.partsEdit=data=>request('/campus-repair/partsEdit','PUT',data)


// 消息列表
api.getNewsList=data=>request('/campus-repair/getNewsList','GET',data)
// 消息详情
api.getNewsInfo=data=>request('/campus-repair/getNewsInfo','GET',data)

export default api

